import Vue from 'vue'
import Router from 'vue-router'
import main from '@/pages/Main.vue'
import editTemplate from './editTemplate.js'
import knowledgeBase from './knowledgeBase'
import reportView from './reportView'

Vue.use(Router)
const mainRouteChildren = [...editTemplate,...knowledgeBase,...reportView]
const routes = [{
        path: '/',
        name: 'rags_main',
        redirect: '/home',
        component: main,
        children: [{
                path: '/home',
                name: 'rags_home',
                mate: {
                    title: '首页'
                },
                component: () => import('@/pages/home.vue')
            },
            ...mainRouteChildren
        ]
    },
    {
        path: '/login',
        name: 'rags_login',
        component: () => import('../pages/login.vue')
    }
]


export default new Router({
    routes
})
